package DataBase;


import java.util.HashSet;

import java.util.Set;

/**
* Description : the TagDB class for the table
* <p>
*
*@author Danielle
*/
public class TagDB implements java.io.Serializable {
	private static final long serialVersionUID = 1L;
    private long tagId=1;
    private String tagName=null;
    private Set<FileDB> files = new HashSet<FileDB>(0);
    
    /**
	* Description Ctor
	*/
    public TagDB() {
    }
    
    /**
	* Description Ctor
	* @param String tagName
	*/
    public TagDB(String tagName) {
        this.tagName = tagName;
    }
    
    /**
	* Description getTagId
	* @return long
	*/
    public long getTagId() {
        return this.tagId;
    }
    
    /**
	* Description setTagId
	* @param long tagId
	*/
    public void setTagId(long tagId) {
        this.tagId = tagId;
    }
    
    /**
	* Description setFiles
	* @param Set<FileDB> files
	*/
    public void setFiles(Set<FileDB> files) {
        this.files = files;
    }
    
    /**
	* Description getFiles
	* @return  Set<FileDB>
	*/
    public Set<FileDB> getFiles() {
        return files;
    }
    
    /**
	* Description getTagName
	* @return String
	*/
    public String getTagName() {
        return this.tagName;
    }
    
    /**
	* Description setTagName
	* @param String tagName
	*/
    public void setTagName(String tagName) {
        this.tagName = tagName;
    }
    
    /**
	* Description hashCode
	* @return int
	*/
    public int hashCode() {
        int hash = 0;
        hash += (tagName != null ? tagName.hashCode() : 0);
        return hash;
	}
	
    
    /**
	* Description equals
	* @param Object object
	* @return boolean
	*/
	@Override
	public boolean equals(Object object) {
	    // TODO: Warning - this method won't work in the case the id fields are not set
		if (this == object)
			return true;
		if (object == null)
			return false;
		if (getClass() != object.getClass())
			return false;
		TagDB other = (TagDB) object;
		if (tagName == null) {
			if (other.tagName != null)
				return false;
		} 
		else if (!tagName.equals(other.tagName))
			return false;
		return true;
	}
 
}